<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<script type="text/javascript" src="./js/angular.min.js"></script>
<style type="text/css">
.red{color:red;}
</style>
</head>
<body>
<div ng-app="myApp" ng-controller="myAppController">
{{curTime}}
</div>
<script type="text/javascript">
var myApp = angular.module("myApp",[]);
myApp.controller("myAppController",function($scope){
	$scope.curTime = new Date();
	// 这样是看不到效果，没有触发脏检查
	// setInterval(function(){
	// 	$scope.curTime = new Date();
	// },1000);
	setInterval(function(){
		$scope.$apply(function(){
			$scope.curTime = new Date();
		});
	},1000);
});
</script>
</body>
</html>